import { Graphics } from "pixi.js";

import { UserHub } from "../UserInput/UserListener";
import { Tool } from "./Tool";
import { userInput } from "./User";

export class Move extends Tool {
    name = "移动工具";
    blend: 0 | 1 = 0;
    drawStart({ layer, data }: userInput): void {}
    drawEnd({ data }: userInput): void {}
    drawing({ layer, data }: userInput): void {}

    protected size = 1;
    constructor() {
        super();
    }
    destroy() {}
    /** 每次转换工具的时候触发这个函数 */
    prepare() {
        UserHub.emit("move");
    }
    closed(): void {
        UserHub.emit("stopMove");
    }
    /** 提供一个 Graphics 来绘制笔的样子 */
    drawStyle(g: Graphics) {
        g.clear();
        return;
    }
}
